<html>
   <head>
       <meta charset="utf-8">
       <title>创建,调用react组件</title>
   </head>




   <body>
        <div id="container"></div>

        <script src="js/react.min.js"></script>
        <script src="js/react-dom.min.js"></script>
        <script src="js/babel.min.js"></script>

        <script type="text/babel">
            //创建组件: 类
            var Msg= React.createClass({
                render:function () {
                    return(
                        <div>一个react组件(class类)</div>
                    )
                }
            });

            //调用组件
            ReactDOM.render(
            // <Msg/> 调用组件(类)一次
            
            //调用组件(类)多次
            <div>
                <Msg>aaa</Msg>
                <Msg>bbb</Msg>
            </div>
            ,
            document.getElementById("container")
            )
            
        </script>
   </body>

</html>